package com.moorror.codegenvel.view.window.codegenxrender;

import com.intellij.openapi.project.Project;
import com.moorror.codegenvel.view.component.AbstractLRTabContent;
import com.moorror.codegenvel.view.component.AbstractCodeGenByVelocitySetTab;
import com.moorror.codegenvel.view.component.CodeGenByVelocityComponent;
import com.moorror.codegenvel.view.component.TabContentRightShow;

import javax.swing.*;
import java.awt.*;

/**
 * @Author jiyanghuang
 * @Date 2024/4/11 23:13
 */
public class CodeGenXRenderDataTabContent extends AbstractLRTabContent<CodeGenXRenderLeft, TabContentRightShow> {

    public CodeGenXRenderDataTabContent(Project project, AbstractCodeGenByVelocitySetTab abstractToolSetTab, String tabId) {
        super(project, new CodeGenXRenderLeft(project, abstractToolSetTab), new TabContentRightShow(project, false), abstractToolSetTab, tabId);
        r.fillLeft(l);
        TabContentRightShow tabContentRightShow = CodeGenByVelocityComponent.getInstance(project).findInstance(TabContentRightShow.class, abstractToolSetTab.tabName(), tabId);
        if (null != tabContentRightShow && null == tabContentRightShow.getCurrentShow()) {
            tabContentRightShow.updatePanel(new JPanel(new BorderLayout()));
        }
    }
}
